package com.gilight.base;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableScheduling
@MapperScan({"com.gilight.*.dao","com.gilight.*.mapper"})
@EnableCaching
public class Application {

    public static void main(String[] args) {
       // SpringApplication.run(Application.class, args);

        double aa1 =  0.14d;
       double aa =  sqrt(aa1);

    }
//写一个开5次方根
    public static double sqrt(double a){
        double x = 1;
        for(int i = 0;i<5;i++){
            x = (x+a/x)/2;
        }
        return x;
    }

}
